# Generated by Django 4.2.1 on 2023-05-12 00:39

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Human',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Имя')),
                ('surname', models.CharField(max_length=50, verbose_name='Фамилия')),
                ('gender', models.CharField(choices=[('F', 'Female'), ('M', 'Male'), ('O', 'Other')], max_length=1, verbose_name='Пол')),
            ],
        ),
        migrations.CreateModel(
            name='PlaceOfResidence',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(max_length=50, verbose_name='Страна')),
                ('city', models.CharField(max_length=50, verbose_name='Город')),
                ('address', models.CharField(max_length=100, verbose_name='Адрес')),
                ('postal_code', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(6)], verbose_name='Почтовый индекс')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to='human_dossier.human', verbose_name='Владелец')),
            ],
        ),
        migrations.CreateModel(
            name='Marriage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('beginning_of_marriage', models.DateTimeField(verbose_name='Начало брака')),
                ('end_of_marriage', models.DateTimeField(blank=True, null=True, verbose_name='Конец брака')),
                ('is_marriage_valid', models.BooleanField(default=True, verbose_name='Брак действителен')),
                ('husband', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='husband', to='human_dossier.human', verbose_name='Муж')),
                ('wife', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wife', to='human_dossier.human', verbose_name='Жена')),
            ],
        ),
        migrations.CreateModel(
            name='AdditionalDataHuman',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('blood_type', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(4)], verbose_name='Группа крови')),
                ('is_unemployed', models.BooleanField(blank=True, null=True, verbose_name='Безработный')),
                ('is_married', models.BooleanField(verbose_name='Находится в браке')),
                ('human', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='additional_data', to='human_dossier.human', verbose_name='Дополнительные данные')),
            ],
        ),
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(verbose_name='Описание')),
                ('evaluation', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(10)], verbose_name='Оценка')),
                ('date', models.DateTimeField(verbose_name='Дата')),
                ('human', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actions', to='human_dossier.human', verbose_name='Человек')),
            ],
        ),
    ]
